Allow to create a pool with NULL params - #1409
Merged
Merged
Conversation
bratpiorka
reviewed
Jul 3, 2025
bratpiorka
reviewed
Jul 3, 2025
bratpiorka
reviewed
Jul 3, 2025
bratpiorka
reviewed
Jul 3, 2025
bratpiorka
reviewed
Jul 3, 2025
lplewa
requested changes
Jul 3, 2025
KFilipek
force-pushed
the
create_with_null
branch
from
July 3, 2025 12:00
d14149a to
45c78ee
Compare
bratpiorka
reviewed
Jul 3, 2025
bratpiorka
reviewed
Jul 3, 2025
bratpiorka
reviewed
Jul 3, 2025
KFilipek
force-pushed
the
create_with_null
branch
from
July 3, 2025 12:38
45c78ee to
675f786
Compare
bratpiorka
approved these changes
Jul 3, 2025
KFilipek
force-pushed
the
create_with_null
branch
2 times, most recently
from
July 3, 2025 13:52
eba9ea7 to
2c04d26
Compare
KFilipek
force-pushed
the
create_with_null
branch
2 times, most recently
from
July 3, 2025 15:00
fc88217 to
40739be
Compare
KFilipek
force-pushed
the
create_with_null
branch
2 times, most recently
from
July 4, 2025 09:13
40d794c to
5c028ae
Compare
lukaszstolarczuk
approved these changes
Jul 4, 2025
lplewa
reviewed
Jul 4, 2025
KFilipek
force-pushed
the
create_with_null
branch
from
July 4, 2025 16:19
5c028ae to
e9d89b6
Compare
lplewa
reviewed
Jul 7, 2025
Comment on lines
+434
to
+446
| int n_arenas_set_from_params = 0; | ||
| int err; | ||
| const umf_jemalloc_pool_params_t *jemalloc_params = params; | ||
| const umf_jemalloc_pool_params_t *jemalloc_params; | ||
|
|
||
| size_t n_arenas = 0; | ||
| if (jemalloc_params) { | ||
| n_arenas = jemalloc_params->n_arenas; | ||
| n_arenas_set_from_params = 1; | ||
| // If params is NULL, use default values | ||
| umf_jemalloc_pool_params_t default_params = {}; // Will be calculated later | ||
|
|
||
| if (!params) { | ||
| jemalloc_params = &default_params; | ||
| } else { | ||
| jemalloc_params = params; | ||
| } | ||
| size_t n_arenas = jemalloc_params->n_arenas; | ||
| int n_arenas_set_from_params = (params != NULL); |
Contributor
There was a problem hiding this comment.
why what? please be more specific in reviews! :)
Contributor
There was a problem hiding this comment.
Well this is very specific question which i asked - why did you made this changes?
Contributor
Author
There was a problem hiding this comment.
In the original implementation, there was a variable definition that would later change. Here is a definition that relies on the value provided by the user (NULL or not) and set proper value.
lplewa
approved these changes
Jul 8, 2025
KFilipek
force-pushed
the
create_with_null
branch
from
July 8, 2025 10:32
3dc3f45 to
2e22aa4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist